#pragma once

#include "./proto/opcode.h"
#include "./DataPacket.h"

#define PACKET_NEW new
#define PACKET_DELETE delete

typedef int HANDLE_FD;

#define INVALID_FD (HANDLE_FD)(~0)

enum OUTPACKET_RESULT
{
	OUTPACKET_RESULT_SUCCESS = 1,
	OUTPACKET_RESULT_NO_ROOM_IN_BUFFER = 2,
	OUTPACKET_RESULT_NOT_CONNECTED = 3,
	OUTPACKET_RESULT_SOCKET_ERROR = 4,
};

#define CLIENTSOCKET_SENDBUF_SIZE 64000
#define CLIENTSOCKET_RECVBUF_SIZE 64000
